package com.colorlight.cloud.auth.model;

import com.colorlight.cloud.common.model.enums.api.ExceptionInterface;
import lombok.Getter;

/**
 * @author Demon
 *  认证服务异常定义
 *  服务前缀 300XX
 */
@Getter
public enum AuthExceptionEnum implements ExceptionInterface<AuthExceptionEnum> {
	
	
	AUTH_PARAMETER_EXCEPTION(30001, "auth 参数校验异常"),
	HMAC_SIGN_CALCULATION_EXCEPTION(30002, "auth 计算密码失败");
	
	/**
	 * 编码
	 */
	private final Integer code;
	
	/**
	 * 异常信息描述
	 */
	private final String description;
	
	
	AuthExceptionEnum(Integer code, String description) {
		this.code = code;
		this.description = description;
	}
	
	@Override
	public Integer getCode() {
		return code;
	}
	
	@Override
	public AuthExceptionEnum getT() {
		return this;
	}
	
	@Override
	public String getThisDescription() {
		return this.getDescription();
	}
	
}
